package com.demo.swingquickticket.swing;

import com.demo.swingquickticket.swing.layoutUtil.WindowUtil;
import com.demo.swingquickticket.swing.view.ticket.TicketPanel;

import javax.swing.*;

public class MainFrame extends JFrame {
    public MainFrame() {
        this.setTitle("12306购票系统");
        this.setSize(WindowUtil.getWindowWidth() / 2, WindowUtil.getWindowHeight() / 2);
        this.setJMenuBar(new AppMenuBar());

        this.getContentPane().add(new TicketPanel());
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setVisible(true);
    }
}
